home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / GS_DPS1.PS < prev    next >
Text File  |  1991-12-29  |  9KB  |  242 lines

  1. %    Copyright (C) 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2. %    Distributed by Free Software Foundation, Inc.
  3. %
  4. % This file is part of Ghostscript.
  5. %
  6. % Ghostscript is distributed in the hope that it will be useful, but
  7. % WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. % to anyone for the consequences of using it or for whether it serves any
  9. % particular purpose or works at all, unless he says so in writing.  Refer
  10. % to the Ghostscript General Public License for full details.
  11. %
  12. % Everyone is granted permission to copy, modify and redistribute
  13. % Ghostscript, but only under the conditions described in the Ghostscript
  14. % General Public License.  A copy of this license is supposed to have been
  15. % given to you along with Ghostscript so you can know your rights and
  16. % responsibilities.  It should be in a file named COPYING.  Among other
  17. % things, the copyright notice and this notice must be preserved on all
  18. % copies.
  19.  
  20. % Initialization file for Ghostscript analogs of Display PostScript
  21. % functions that are also included in Level 2.
  22. % When this is run, systemdict is still writable.
  23.  
  24. % ------ Binary token support ------ %
  25.  
  26. % Initialization for the system name table.
  27.  
  28. mark
  29. % 0
  30.     /abs /add /aload /anchorsearch /and
  31.     /arc /arcn /arct /arcto /array
  32.     /ashow /astore /awidthshow /begin /bind
  33.     /bitshift /ceiling /charpath /clear /cleartomark
  34. % 20
  35.     /clip /clippath /closepath /concat /concatmatrix
  36.     /copy /count /counttomark /currentcmykcolor /currentdash
  37.     /currentdict /currentfile /currentfont /currentgray /currentgstate
  38.     /currenthsbcolor /currentlinecap /currentlinejoin /currentlinewidth /currentmatrix
  39. % 40
  40.     /currentpoint /currentrgbcolor /currentshared /curveto /cvi
  41.     /cvlit /cvn /cvr /cvrs /cvs
  42.     /cvx /def /defineusername /dict /div
  43.     /dtransform /dup /end /eoclip /eofill
  44. % 60
  45.     /eoviewclip /eq /exch /exec /exit
  46.     /file /fill /findfont /flattenpath /floor
  47.     /flush /flushfile /for /forall /eg
  48.     /get /getinterval /grestore /gsave /gstate
  49. % 80
  50.     /gt /identmatrix /idiv /idtransform /if
  51.     /ifelse /image /imagemask /index /ineofill
  52.     /infill /initviewclip /inueofill /inufill /invertmatrix
  53.     /itransform /known /le /length /lineto
  54. % 100
  55.     /load /loop /lt /makefont /matrix
  56.     /maxlength /mod /moveto /mul /ne
  57.     /neg /newpath /not /null /or
  58.     /pathbbox /pathfoall /pop /print /printobject
  59. % 120
  60.     /put /putinterval /rcurveto /read /readhexstring
  61.     /readline /readstring /rectclip /rectfill /rectstroke
  62.     /rectviewclip /repeat /restore /rlineto /rmoveto
  63.     /roll /rotate /round /save /scale
  64. % 140
  65.     /scalefont /search /selectfont /setbbox /setcachedevice
  66.     /setcachedevice2 /setcharwidth /setcmykcolor /setdash /setfont
  67.     /setgray /setgstate /sethsbcolor /setlinecap /setlinejoin
  68.     /setlinewidth /setmatrix /setrgbcolor /setshared /shareddict
  69. % 160
  70.     /show /showpage /stop /stopped /store
  71.     /string /stringwidth /stroke /strokepath /sub
  72.     /systemdict /token /transform /translate /truncate
  73.     /type /uappend /ucache /ueofill /ufill
  74. % 180
  75.     /undef /upath /userdict /ustroke /viewclip
  76.     /viewclippath /where /widthshow /write /writehexstring
  77.     /writeobject /writestring /wtranslation /xor /xshow
  78.     /xyshow /yshow /FontDirectory /SharedFontDirectory /Courier
  79. % 200
  80.     /Courier-Bold /Courier-BoldOblique /Courier-Oblique /Helvetica /Helvetica-Bold
  81.     /Helvetica-BoldOblique /Helvetica-Oblique /Symbol /Times-Bold /Times-BoldItalic
  82.     /Times-Italic /Times-Roman /execuserobject /currentcolor /currentcolorspace
  83.     /currentglobal /execform /filter /findresource /globaldict
  84. % 220
  85.     /makepattern /setcolor /setcolorspace /setglobal /setpagedevice
  86.     /setpattern
  87. % pad to 256
  88.     counttomark 256 exch sub { 0 } repeat
  89. % 256
  90.     /= /== /ISOLatin1Encoding /StandardEncoding
  91. % 260
  92.     /[ /] /atan /banddevice /bytesavailable
  93.     /cachestatus /closefile /colorimage /condition /copypage
  94.     /cos /countdictstack /countexecstack /cshow /currentblackgeneration
  95.     /currentcacheparams /currentcolorscreen /currentcolortransfer /currentcontext /currentflat
  96. % 280
  97.     /currenthalftone /currenthalftonephase /currentmiterlimit /currentobjectformat /currentpacking
  98.     /currentscreen /currentstrokeadjust /currenttransfer /currentundercolorremoval /defaultmatrix
  99.     /definefont /deletefile /detach /deviceinfo /dictstack
  100.     /echo /erasepage /errordict /execstack /executeonly
  101. % 300
  102.     /exp /false /filenameforall /fileposition /fork
  103.     /framedevice /grestoreall /handleerror /initclip /initgraphics
  104.     /initmatrix /instroke /inustroke /join /kshow
  105.     /ln /lock /log /mark /monitor
  106. % 320
  107.     /noaccess /notify /nulldevice /packedarray /quit
  108.     /rand /rcheck /readonly /realtime /renamefile
  109.     /renderbands /resetfile /reversepath /rootfont /rrand
  110.     /run /scheck /setblackgeneration /setcachelimit /setcacheparams
  111. % 340
  112.     /setcolorscreen /setcolortransfer /setfileposition /setflat /sethalftone
  113.     /sethalftonephase /setmiterlimit /setobjectformat /setpacking /setscreen
  114.     /setstrokeadjust /settransfer /setucacheparams /setundercolorremoval /sin
  115.     /sqrt /srand /stack /status /statusdict
  116. % 360
  117.     /true /ucachestatus /undefinefont /usertime /ustrokepath
  118.     /version /vmreclaim /vmstatus /wait /wcheck
  119.     /xcheck /yield /defineuserobject /undefineuserobject /UserObjects
  120.     /cleardictstack
  121. % 376
  122.     /A /B /C /D /E /F /G /H /I /J /K /L /M
  123.     /N /O /P /Q /R /S /T /U /V /W /X /Y /Z
  124.     /a /b /c /d /e /f /g /h /i /j /k /l /m
  125.     /n /o /p /q /r /s /t /u /v /w /x /y /z
  126. % 428
  127.     /setvmthreshold (<<) cvn
  128.     (>>) cvn /currentcolorrendering /currentdevparams /currentoverprint /currentpagedevice
  129.     /currentsystemparams /currentuserparams /defineresource /findencoding /gcheck
  130. % 440
  131.     /glyphshow /languagelevel /product /pstack /resourceforall
  132.     /resourcestatus /revision /serialnumber /setcolorrendering /setdevparams
  133.     /setoverprint /setsystemparams /setuserparams /startjob /undefineresource
  134.     /GlobalFontDirectory /ASCII85Decode /ASCII85Encode /ASCIIHexDecode /ASCIIHexEncode
  135. % 460
  136.     /CCITTFaxDecode /CCITTFaxEncode /DCTDecode /DCTEncode /LZWDecode
  137.     /LZWEncode /NullEncode /RunLengthDecode /RunLengthEncode /SubFileDecode
  138.     /CIEBasedA /CIEBasedABC /DeviceCMYK /DeviceGray /DeviceRGB
  139.     /Indexed /Pattern /Separation
  140. % 478 -- end
  141. counttomark packedarray exch pop
  142.  
  143. % Install the system and user name tables.
  144. % The user name table is read-only for ordinary programs,
  145. % since it doesn't obey save/restore and must be managed specially.
  146.  
  147. dup /SystemNames exch def
  148. 100 array readonly dup /UserNames exch def
  149. .installnames
  150.  
  151. % ------ Fonts ------ %
  152.  
  153. /selectfont
  154.     { exch findfont exch
  155.       dup type /arraytype eq { makefont } { scalefont } ifelse
  156.       setfont
  157.     } odef
  158. /undefinefont
  159.     { FontDirectory exch undef
  160.     } odef
  161.  
  162. % ------ Halftones ------ %
  163.  
  164. %**************** These are pretty much stubs ****************%
  165. % since they only recognize a subset of the halftone types,
  166. % and don't return the actual frequency and angle.
  167.  
  168. /currenthalftone
  169.     { currentscreen 4 dict begin
  170.       /HalftoneType 1 def
  171.       /SpotFunction exch def
  172.       /Angle exch def
  173.       /Frequency exch def
  174.       currentdict end
  175.     } odef
  176. /getall        % dict keyarray -> values
  177.     { 1 index exch { get exch dup } forall pop pop
  178.     } bind def
  179. /.sethalftone1
  180.     { { /Frequency /Angle /SpotFunction } getall setscreen
  181.     } bind def
  182. /.sethalftone2
  183.     { { /RedFrequency /RedAngle /RedSpotFunction
  184.         /GreenFrequency /GreenAngle /GreenSpotFunction
  185.         /BlueFrequency /BlueAngle /BlueSpotFunction
  186.         /GrayFrequency /GrayAngle /GraySpotFunction
  187.       } getall setcolorscreen
  188.     } bind def
  189. /sethalftone
  190.     { dup /HalftoneType get 1 sub
  191.        { .sethalftone1 .sethalftone2 .sethalftone3 .sethalftone4
  192.          .sethalftone5
  193.        } exch get cvx exec
  194.     } odef
  195.  
  196. % ------ User objects ------ %
  197.  
  198. /defineuserobject
  199.     { userdict /UserObjects known
  200.        { 1 index userdict /UserObjects get length ge
  201.           { 1 index 1 add array userdict /UserObjects get
  202.             1 index copy pop
  203.             userdict /UserObjects 3 -1 roll put
  204.           } if }
  205.        { userdict /UserObjects 3 index 1 add array put }
  206.       ifelse
  207.       userdict /UserObjects get 3 1 roll put
  208.     } odef
  209. /execuserobject
  210.     { userdict /UserObjects get exch get exec
  211.     } odef
  212. /undefineuserobject
  213.     { userdict /UserObjects get exch null put
  214.     } odef
  215.  
  216. % ------ User paths ------ %
  217.  
  218. /upath
  219.     { [ exch {/ucache cvx} if pathbbox /setbbox cvx
  220.       {/moveto cvx} {/lineto cvx} {/curveto cvx} {/closepath cvx}
  221.       pathforall ] cvx
  222.     } odef
  223.  
  224. % Dummy definitions for cache control operators
  225.  
  226. /ucachestatus
  227.     { mark 0 0 0 0 0 } odef
  228. /setucacheparams
  229.     { cleartomark } odef
  230.  
  231. % ------ Virtual memory ------ %
  232.  
  233. %**************** Everything here is a stub. ****************%
  234.  
  235. /currentshared { false } odef
  236. /scheck { pop false } odef
  237. /setshared { pop } odef
  238. /setvmthreshold { pop } odef
  239. /shareddict userdict def
  240. /SharedFontDirectory FontDirectory def
  241. /vmreclaim { pop } odef
  242.